let solve ls =
  let square_of_sum =
    let sum = List.fold (+) 0 ls
    sum * sum
  let sum_of_square =
    ls |> List.map (fun n -> n * n) |> List.fold (+) 0
  square_of_sum - sum_of_square

let sol1 = [1..10] |> solve |> printf "%d\n"
let sol2 = [1..100] |> solve |> printf "%d\n"
